<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true" CodeFile="AddNewCCardDetails.aspx.cs" Inherits="Admin_credit_card_AddNewCCardDetails" %>
<%@ Register Src="~/controls/usrDuration.ascx" TagName="usrDuration" TagPrefix="uc1" %>
<%@ Register Src="~/controls/usrDurationExpiry.ascx" TagName="usrDurationExpiry" TagPrefix="uc2" %>
<%@ Register Src="~/controls/usrNoOfDays.ascx"TagName="usrNoOfDays" TagPrefix="uc3" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <div class="contents">
        <table width="100%" cellpadding="3" cellspacing="0" border="0">
            <tr>
                <td colspan="2">
                    <h1>Credit New Card Info</h1><asp:Label ID="lblCCID" Visible="false" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="2"><h2>Card Info</h2></td>
            </tr>
            <tr>
                <td valign="top" width="30%">Finalcial Insititute</td>
                <td  valign="top">
                    <asp:DropDownList ID="ddlProviderCompanyName" runat="server" AutoPostBack="false" Width="150px"></asp:DropDownList>
                        <asp:RequiredFieldValidator ID="rfvProviderCompanyName" runat="server" ErrorMessage="*"
                            ControlToValidate="ddlProviderCompanyName" ValidationGroup="CC" InitialValue="-1"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">Card Class</td>
                <td  valign="top">
                    <asp:DropDownList ID="ddlCardclass" runat="server" Width="150px">
                        <asp:ListItem Value="-1">Select</asp:ListItem>
                        <asp:ListItem Value="1">Credit</asp:ListItem>
                        <asp:ListItem Value="2">Debit</asp:ListItem>
                        <asp:ListItem Value="3">Charge</asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvCardClass" runat="server" ControlToValidate="ddlCardclass"
                        InitialValue="-1" ErrorMessage="Choose Card Class." ValidationGroup="CC">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">Product Name</td>
                <td  valign="top">
                    <asp:TextBox ID="txtProductname" runat="server" MaxLength="150" Width="250px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvProductname" runat="server" ControlToValidate="txtProductname"
                            ErrorMessage="Require Product Name." ValidationGroup="CC">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">Card Status</td>
                <td  valign="top">
                    <asp:DropDownList ID="ddlCardstatus" runat="server" Width="150px">
                        <asp:ListItem Value="-1">Select</asp:ListItem>
                        <asp:ListItem Value="1">Platinum</asp:ListItem>
                        <asp:ListItem Value="2">Gold</asp:ListItem>
                        <asp:ListItem Value="3">Silver</asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvCardbrand" runat="server" ControlToValidate="ddlCardstatus"
                        InitialValue="-1" ErrorMessage="Choose Card Brad." ValidationGroup="CC">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">Card Type</td>
                <td  valign="top">
                    <asp:DropDownList ID="ddlCardtype" runat="server" Width="150px">
                        <asp:ListItem Value="-1">Select</asp:ListItem>
                        <asp:ListItem Value="1">Master</asp:ListItem>
                        <asp:ListItem Value="2">Visa</asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvCardtype" runat="server" ControlToValidate="ddlCardtype"
                        InitialValue="-1" ErrorMessage="Choose Card Type." ValidationGroup="CC">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2"><h2>Application Criteria</h2></td>
            </tr>
            <tr>
                <td valign="top">Minimum Annual Income - Local&nbsp;( $ )</td>
                <td  valign="top">
                    <asp:TextBox ID="txtMinAnnualloc" runat="server" Width="80px" MaxLength="10"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvMinAnnualloc" runat="server" ControlToValidate="txtMinAnnualloc"
                            ErrorMessage="Require Minimum Annual Income (Local)." ValidationGroup="CC">*</asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="revMinAnnualloc" runat="server" ControlToValidate="txtMinAnnualloc"
                            ErrorMessage="Enter Number value." ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">Minimum Annual Income - Foreigner&nbsp;( $ )</td>
                <td  valign="top">
                    <asp:TextBox ID="txtMinAnnualfor" runat="server" Width="80px" MaxLength="10"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvMinAnnualfor" runat="server" ControlToValidate="txtMinAnnualfor"
                            ErrorMessage="Require Minimum Annual Income (Foreigner)." ValidationGroup="CC">*</asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="revMinAnnualfor" runat="server" ControlToValidate="txtMinAnnualfor"
                            ErrorMessage="Enter Number value." ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">Minimum Age of Applicant</td>
                <td  valign="top">
                    <asp:DropDownList ID="ddlMinAgeOfApplicant" runat="server" Width="50px"></asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvMinAgeLimit" runat="server" ControlToValidate="ddlMinAgeOfApplicant"
                        InitialValue="-1" ErrorMessage="Choose minimum age of  applicant."></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">Maximum Age of Applicant</td>
                <td  valign="top">
                    <asp:DropDownList ID="ddlMaxAgeOfApplicant" runat="server" Width="50px"></asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvMaxAgeLimit" runat="server" ControlToValidate="ddlMaxAgeOfApplicant"
                        InitialValue="-1" ErrorMessage="Choose maximum age of applicant."></asp:RequiredFieldValidator>    
                </td>
            </tr>
            <tr>
                <td colspan="2"><h2>Industry Rates</h2></td>
            </tr>
            <tr>
                <td valign="top">Balance Transfer&nbsp;( % )</td>
                <td  valign="top">
                    <asp:TextBox ID="txtBalancetransfer" runat="server" Width="80px" MaxLength="10"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvBalancetransfer" runat="server" ControlToValidate="txtBalancetransfer"
                            ErrorMessage="*" ValidationGroup="CC"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revBalancetransfer" runat="server" ControlToValidate="txtBalancetransfer"
                            ErrorMessage="Enter Number value." ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">Duration of Balance Transfer</td>
                <td  valign="top">
                    <uc1:usrDuration id="ddlDurofBalTrans" ValidationGroup="CC" runat="server" />Months
                </td>
            </tr>
            <tr>
                <td valign="top">Intrest Rate - Purchase&nbsp;( % )</td>
                <td  valign="top">
                    <asp:TextBox ID="txtInsratePurchase" runat="server" Width="80px" MaxLength="10"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvInsratePurchase" runat="server" ControlToValidate="txtInsratePurchase"
                            ErrorMessage="*" ValidationGroup="CC"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revInsratePurchase" runat="server" ControlToValidate="txtInsratePurchase"
                            ErrorMessage="Enter Number value." ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">Duration of Purchase Rate</td>
                <td  valign="top">
                    <uc1:usrDuration id="ddlDurofPurchaserate" ValidationGroup="CC" runat="server" />Months
                </td>
            </tr>
            <tr>
                <td valign="top">Interest Rate - Cash&nbsp;( % )</td>
                <td  valign="top">
                    <asp:TextBox ID="txtInterestrateCash" runat="server" Width="80px" MaxLength="10"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvInterestrateCash" runat="server" ControlToValidate="txtInterestrateCash"
                            ErrorMessage="*" ValidationGroup="CC"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revInterestrateCash" runat="server" ControlToValidate="txtInterestrateCash"
                            ErrorMessage="Enter Number value." ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2"><h2>Fees & Charges</h2></td>
            </tr>
            <tr>
                <td valign="top">Credit Card Anual Fee&nbsp;( $ )</td>
                <td  valign="top">
                    <asp:TextBox ID="txtAnualFee" runat="server" Width="60px" MaxLength="4"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvAnualFee" runat="server" ControlToValidate="txtAnualFee"
                            ErrorMessage="*" ValidationGroup="CC"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revAnualFee" runat="server" ControlToValidate="txtAnualFee"
                            ErrorMessage="Enter Number value." ValidationExpression="[0-9]+(\[0-9]{1,2})?$"></asp:RegularExpressionValidator><br />
                    <asp:TextBox id="txtAnualFeeDetails" runat="server" Width="250px" MaxLength="145"></asp:TextBox>
                    <%--<asp:RequiredFieldValidator ID="rfvAnualFeeDetails" runat="server" ControlToValidate="txtAnualFee"
                            ErrorMessage="*" ValidationGroup="CC"></asp:RequiredFieldValidator>--%>
                </td>
            </tr>
            <tr>
                <td valign="top">Supplementary Fee&nbsp;( $ )</td>
                <td  valign="top">
                    <asp:TextBox ID="txtSupplementary" runat="server" Width="60px" MaxLength="4"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvSupplementary" runat="server" ControlToValidate="txtSupplementary"
                            ErrorMessage="*" ValidationGroup="CC"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revSupplementary" runat="server" ControlToValidate="txtSupplementary"
                            ErrorMessage="Enter Number value." ValidationExpression="^[0-9]+(\[0-9]{1,2})?$"></asp:RegularExpressionValidator><br />
                    <asp:TextBox id="txtSupplementaryDetails" runat="server" Width="250px" MaxLength="145"></asp:TextBox>
                    <%--<asp:RequiredFieldValidator ID="rfvSupplementaryDetails" runat="server" ControlToValidate="txtSupplementary"
                            ErrorMessage="*" ValidationGroup="CC"></asp:RequiredFieldValidator>--%>
                </td>
            </tr>
            <tr>
                <td valign="top">Late Payment Charge&nbsp;( % )</td>
                <td  valign="top">
                    <asp:TextBox ID="txtLatepaymentcharge" runat="server" Width="80px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvLatepaymentcharge" runat="server" ControlToValidate="txtLatepaymentcharge"
                            ErrorMessage="*" ValidationGroup="CC"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revLatepaymentcharge" runat="server" ControlToValidate="txtLatepaymentcharge"
                            ErrorMessage="Enter Number value." ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            
            <tr>
                <td valign="top">Minimum Charge&nbsp;( $ )</td>
                <td  valign="top">
                    <asp:TextBox ID="txtMinimumcharge" runat="server" Width="80px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvMinimumcharge" runat="server" ControlToValidate="txtMinimumcharge"
                            ErrorMessage="*" ValidationGroup="CC"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revMinimumcharge" runat="server" ControlToValidate="txtMinimumcharge"
                            ErrorMessage="Enter Number value." ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">Min Monthly Repayment&nbsp;( $ )</td>
                <td  valign="top">
                    <asp:TextBox ID="txtMinmonthlyrepayment" runat="server" Width="80px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvMinmonthlyrepayment" runat="server" ControlToValidate="txtMinmonthlyrepayment"
                            ErrorMessage="*" ValidationGroup="CC"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revMinmonthlyrepayment" runat="server" ControlToValidate="txtMinmonthlyrepayment"
                            ErrorMessage="Enter Number value." ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">Cash Advance Withdrawal Charges&nbsp;( % )</td>
                <td  valign="top">
                    <asp:TextBox ID="txtWithdrawalcharge" runat="server" Width="80px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvWithdrawalcharge" runat="server" ControlToValidate="txtWithdrawalcharge"
                            ErrorMessage="*" ValidationGroup="CC"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revWithdrawalcharge" runat="server" ControlToValidate="txtWithdrawalcharge"
                            ErrorMessage="Enter Number value." ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">Cash Advance Finance Charges</td>
                <td  valign="top">
                    <asp:RadioButton ID="rbtnDollers" runat="server" Text="( $ )" GroupName="DP" />&nbsp;
                    <asp:RadioButton ID="rbtnPercentage" runat="server" Text="( % )" GroupName="DP" /><br />
                    <asp:TextBox ID="txtFinancecharge" runat="server" Width="100px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvFinancecharge" runat="server" ControlToValidate="txtFinancecharge"
                            ErrorMessage="*" ValidationGroup="CC"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revFinancecharge" runat="server" ControlToValidate="txtFinancecharge"
                            ErrorMessage="Enter Number value." ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2"><h2>Benefits</h2></td>
            </tr>
            <tr>
                <td valign="top">Fee Waiver</td>
                <td  valign="top">
                    <asp:RadioButton ID="rbtnFWyes" runat="server" Text="Yes" GroupName="FW" />&nbsp;&nbsp;
				    <asp:RadioButton ID="rbtnFWno" runat="server" Text="No" GroupName="FW" />
                </td>
            </tr>
            <tr>
                <td valign="top">Duration of Fee Waiver</td>
                <td  valign="top">
                    <uc1:usrDuration id="ddlDurofFeewaiver" ValidationGroup="CC" runat="server" />Months
                </td>
            </tr>
            
            <tr>
                <td valign="top">Welcome Gift</td>
                <td  valign="top">
                    <asp:RadioButton ID="rbtnWGyes" runat="server" Text="Yes" GroupName="WG" />&nbsp;&nbsp;
				    <asp:RadioButton ID="rbtnWGno" runat="server" Text="No" GroupName="WG" />
                </td>
            </tr>
            <tr>
                <td valign="top">Rewards Points</td>
                <td  valign="top">
                    <asp:RadioButton ID="rbtnRPyes" runat="server" Text="Yes" GroupName="RP" />&nbsp;&nbsp;
				    <asp:RadioButton ID="rbtnRPno" runat="server" Text="No" GroupName="RP" />
                </td>
            </tr>
            <tr>
                <td valign="top">Rewards Points Expiry</td>
                <td  valign="top">
                    <uc2:usrDurationExpiry ID="ddlRewardspointsExp" ValidationGroup="CC" runat="server" />Months
                </td>
            </tr>
            <tr>
                <td  valign="top">Rewards / Privileges</td>
                <td  valign="top">
                    <asp:TextBox ID="txtRwdPrivilege" runat="server" MaxLength="250" TextMode="MultiLine" Width="250px" Height="40px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td valign="top">Free Insurance</td>
                <td  valign="top">
                    <asp:RadioButton ID="rbtnFIyes" runat="server" Text="Yes" GroupName="FI" />&nbsp;&nbsp;
				    <asp:RadioButton ID="rbtnFIno" runat="server" Text="No" GroupName="FI" />
                </td>
            </tr>
            <tr>
                <td valign="top">Interest Free Days</td>
                <td  valign="top">
                    <uc3:usrNoOfDays ID="ddlInsfreedays" ValidationGroup="CC" runat="server" />Days
                </td>
            </tr>
            <tr>
                <td valign="top">Destination Miles</td>
                <td  valign="top">
                    <asp:RadioButton ID="rbtnDMyes" runat="server" Text="Yes" GroupName="DM" />&nbsp;&nbsp;
				    <asp:RadioButton ID="rbtnDMno" runat="server" Text="No" GroupName="DM" />
                </td>
            </tr>
            <tr>
                <td valign="top">Duration of Destination Miles</td>
                <td  valign="top">
                    <uc2:usrDurationExpiry ID="ddlDurofDestinMiles" ValidationGroup="CC" runat="server" />Months
                </td>
            </tr>
            <tr>
                <td colspan="2"><h2>Image</h2></td>
            </tr>
            <tr>
                <td valign="top">Card Image</td>
                <td  valign="top">
                    <asp:FileUpload ID="Uploadcardimage" runat="server" Width="250px" />
                </td>
            </tr>
            <tr>
                <td valign="top">Status</td>
                <td  valign="top">
                    <asp:CheckBox ID="chkCCStatus" runat="server" />
                </td>
            </tr>
            <tr>
                <td valign="top">&nbsp;</td>
                <td  valign="top">
                    <p>
                    <asp:Button ID="btnSubmit" runat="server" Text="Submit" Width="80px" CssClass="btn blue" OnClick="btnSubmit_Click"
                        OnClientClick="javascript:if(Page_IsValid) return confirm('Are you sure to save record?');" ValidationGroup="CC" />&nbsp;
                    <asp:Button ID="btnClear" runat="server" Text="Clear" Width="80px"
                        OnClientClick=" return confirm('Are you sure to clear form to create now?');" CssClass="btn blue" OnClick="btnClear_Click" />
                    </p>
                </td>
            </tr>
            <tr>
                <td valign="top">&nbsp;</td>
                <td  valign="top">
                    <asp:Label ID="lblMessage" runat="server" ForeColor="Green" Font-Bold="true"></asp:Label>
                    <asp:Label ID="lblError" runat="server" ForeColor="Red" Font-Bold="true"></asp:Label>
                </td>
            </tr>
        </table>
     </div>
     <script type="text/javascript">
        //<![CDATA[
         function ShowTextBox(ctrlName, varOnOff) 
         {
             if (varOnOff) 
             {
                 document.getElementById(ctrlName).style.display = "block";
             }
             else 
             {
                 document.getElementById(ctrlName).style.display = "none";
             }
         }
         
         function ControlVisible(txt1, txt2) 
         {
             var fee = document.getElementById(txt1);
             ShowTextBox(txt2, true);
             //S1ValidationState(true);
             if (parseFloat(fee.value) > 0) {
                 ShowTextBox(txt2, false);
                 //S1ValidationState(false);
             }
             else 
             {
                 ShowTextBox(txt2, true);
                 //S1ValidationState(true);
             }
         }
         
    //     function ControlVisible2(txt1, txt2) {
    //         var fee = document.getElementById(txt1);
    //         ShowTextBox(txt2, true);
    //         //S2ValidationState(true);
    //         if (parseFloat(fee.value) > 0) {
    //             ShowTextBox(txt2, false);
    //             //S2ValidationState(false);
    //         }
    //         else 
    //         {
    //             ShowTextBox(txt2, true);
    //             //S2ValidationState(true);
    //         }
    //     }
         

         //]]>
    </script>
</asp:Content>

